package face.pay.dao;

import face.pay.entity.CpnCardInfo;
import face.pay.vo.VoCpnCardInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Classname CpnCardInfoDao
 * @Description JJL
 * @Date 2019/12/2 13:39
 */
@Mapper
public interface CpnCardInfoDao {

    /**
     * 活动创建后，提供五种折扣券
     *
     * @param cpnCardInfo
     */
    void insertDiscountCard(List<CpnCardInfo> cpnCardInfo);

    /**
     * 优惠券创建成功后，生成card_id
     *
     * @param cpnCardInfo
     */
    void updateCardId(CpnCardInfo cpnCardInfo);

    /**
     * 活动开启关闭，优惠券状态上线下线
     */
    void updateCardState(CpnCardInfo cpnCardInfo);

    CpnCardInfo getById(CpnCardInfo cpnCardInfo);

    /**
     * 编辑卡券信息
     *
     * @param cpnCardInfo
     */
    void updateCardInfo(CpnCardInfo cpnCardInfo);

    CpnCardInfo getById(Long id);

    CpnCardInfo getAvailableCardById(Long id);

    List<VoCpnCardInfo> getVoCpnCardInfoList(@Param("activityIdList") List<Integer> activityIdList);
}
